//
//  APMeAvatarView.m
//  AqualPolo
//
//  Created by dong on 2024/5/7.
//

#import "APMeAvatarView.h"

@implementation APMeAvatarView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _imageView = [[UIImageView alloc] init];
        _imageView.contentMode = UIViewContentModeScaleAspectFill;
        _imageView.layer.cornerRadius = 70;
        _imageView.layer.masksToBounds = true;
        _imageView.image = [UIImage imageNamed:@"launch_icon"];
        [self addSubview:_imageView];
        [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.center.equalTo(self);
            make.size.mas_equalTo(CGSizeMake(140, 140));
        }];
        _iconImageView = [[UIImageView alloc] init];
        _iconImageView.image = [UIImage imageNamed:@"me_camera_icon"];
        [self addSubview:_iconImageView];
        [_iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.equalTo(self);
            make.right.equalTo(self).offset(-8);
            make.size.mas_equalTo(CGSizeMake(26, 26));
        }];
    }
    return self;
}

@end
